package cn.lili.modules.promotion.service;

import cn.lili.common.vo.PageVO;
import cn.lili.modules.promotion.entity.dos.GreenCommonwealContribution;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pojos.OrderModel;

import java.util.Map;

public interface GreenCommonwealContributionService extends IService<GreenCommonwealContribution> {

    /**
     * 分页获取用户捐赠数据
     * @param pageVO
     * @return
     */
    Map<String, Object> getPage (PageVO pageVO);

    /**
     * 用户捐赠或商品分佣
     * @param openId
     * @param money
     * @return
     */
    Map<String, Object> add (String openId, String money);

    /**
     * 捐赠回调
     * @param orderModel
     * @return
     */
    String callback (OrderModel orderModel);

    /**
     * 获取用户绿色积分余额
     * @return
     */
    String getBalance ();

    /**
     * 用户购买公益商品分佣到绿色公益账户
     * @param greenCommonwealContribution
     */
    void contribution (GreenCommonwealContribution greenCommonwealContribution);

    /**
     * 分页查询捐赠记录
     * @param contribution
     * @param pageVO
     * @return
     */
    Page<GreenCommonwealContribution> getPageByParams (GreenCommonwealContribution contribution, PageVO pageVO);

    /**
     * 获取用户绿色积分余额
     * @return
     */
    String getUserBalance ();

    /**
     * 分页查询捐赠记录
     * @param contribution
     * @param pageVO
     * @return
     */
    Page<GreenCommonwealContribution> getContributionPage (GreenCommonwealContribution contribution, PageVO pageVO);
}
